import 'package:json_annotation/json_annotation.dart';

part 'text_style.g.dart';

@JsonSerializable(includeIfNull: false, explicitToJson: true)
class TextStyle {
  var color;
  var fontStyle;
  var fontWeight;
  var fontFamily;
  var fontSize;
  var lineHeight;
  var width;
  var height;
  var textBorderColor;
  var textBorderWidth;
  var textBorderType;
  var textBorderDashOffset;
  var textShadowColor;
  var textShadowBlur;
  var textShadowOffsetX;
  var textShadowOffsetY;
  var overFlow;
  var ellipsis;
  var lineOverflow;

  //legend中有这些参数
  var backgroundColor;
  var borderColor;
  var borderWidth;
  var borderType;
  var borderDashOffset;
  var borderRadius;
  var padding;
  var shadowColor;
  var shadowBlur;
  var shadowOffsetX;
  var shadowOffsetY;
  var rich;

  //legend 中 emphasis selectorLabel rich

  var verticalAlign;
  var align;

//radar 中name 多项目
  var show;
  var formatter;


  TextStyle(
      {this.color,
      this.fontStyle,
      this.fontWeight,
      this.fontFamily,
      this.fontSize,
      this.lineHeight,
      this.width,
      this.height,
      this.textBorderColor,
      this.textBorderWidth,
      this.textBorderType,
      this.textBorderDashOffset,
      this.textShadowColor,
      this.textShadowBlur,
      this.textShadowOffsetX,
      this.textShadowOffsetY,
      this.overFlow,
      this.ellipsis,
      this.lineOverflow,
      this.backgroundColor,
      this.borderColor,
      this.borderWidth,
      this.borderType,
      this.borderDashOffset,
      this.borderRadius,
      this.padding,
      this.shadowColor,
      this.shadowBlur,
      this.shadowOffsetX,
      this.shadowOffsetY,
      this.rich,
      this.verticalAlign,
      this.align,
      this.show,
      this.formatter});

  factory TextStyle.fromJson(Map<String, dynamic> json) =>
      _$TextStyleFromJson(json);
  Map<String, dynamic> toJson() => _$TextStyleToJson(this);
}
